package com.delong.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.delong.model.app.App;

public interface AppMapper {
	/**
	 * 
	 * @param id
	 * @return
	 */
	List<App> selectList(@Param("id") int id, @Param("title") String title, @Param("company_id") int companyId,
			@Param("category_id") int categoryId, @Param("source") int source, @Param("pageno") int pageno,
			@Param("limit") int limit, @Param("status") int status, @Param("packagename") String packageName,
			 @Param("type") int searchParentCategory
			);

	int addElement(App element);

	int selectListcount(@Param("id") int id, @Param("title") String title, @Param("company_id") int companyId,
			@Param("category_id") int categoryId, @Param("source") int source, @Param("status") int status,
			@Param("packagename") String packageName, @Param("type") int searchParentCategory);

	int changeStatus(@Param("id") int id, @Param("status") int status);

	int changeElement(App element);

	App selectElementById(@Param("id") int id);

	List<App> selectListByCategoryId(@Param("category_id") int categoryId);

	List<App> selectListByCompanyId(@Param("company_id") int companyId);

	List<App> selectListByTagsId(@Param("targs_id") int tagsId);

	App selectElementPackageName(@Param("packagename") String packageName,@Param("id") int id);
}
